package file;

import java.io.File;

public class FileDome {
    public static void main(String[] args) {
        //File file=new File("C:/Users/Administrator/IdeaProjects/jsd2302/demo.txt");
        File file=new File("./demo/txt");
        String name=file.getName();
        System.out.println(name);
        boolean is=file.isHidden();
        System.out.println("文件是否隐藏"+is);
        boolean re=file.canRead();
        System.out.println("文件是否可读"+re);
        boolean wr=file.canWrite();
        System.out.println("文件是否可写"+wr);
        /*
        File file=new File("./dome.txt");
        String name=file.getName();
        System.out.println(name);
        long len=file.length();
        System.out.println(len);
        boolean ih=file.isHidden();
        boolean cr=file.canRead();
        boolean cw=file.canWrite();
        System.out.println("文件是否隐藏"+ih);
        System.out.println("文件是否可读"+cr);

        System.out.println("文件是否可写"+cw);
         */

    }
}
